﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="detalheproduto.aspx.cs" Inherits="Loja.detalheproduto" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <script src="../scripts/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../scripts/jquery-ui-1.8.16.custom/js/jquery-ui-1.8.16.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../scripts/jquery-ui-1.8.16.custom/css/custom-theme/jquery-ui-1.8.16.custom.css" />
    <link rel="stylesheet" href="../scripts/colorbox/colorbox.css" />
    <script type="text/javascript">
        $(document).ready(function () {

            $(".imagem").colorbox({ rel: 'imagem' });

        });

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:HiddenField ID="hdProID" runat=server />
    <div id="img_produto" style="float: left; clear: both; width: 400px">
        <asp:Repeater ID="rptFotos" runat="server">
            <ItemTemplate>
                <a class="imagem" href="<%# DataBinder.Eval(Container.DataItem, "PgmLoc") %>">
                    <img class="foto_gallery" src="<%# DataBinder.Eval(Container.DataItem, "PgmLoc") %>"
                        alt="<%# DataBinder.Eval(Container.DataItem, "PgmNom") %>"> </img>
                </a>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div id="tblprecos" style="float: right; width: 400px">
        <div class="descricao_comp">
            <asp:Literal ID="Literal1" runat="server"></asp:Literal>
        </div>
        <table id="tabela" style="float: right; clear: both;">
            <thead class="cabecalho">
                <tr>
                    <th scope="col" colspan="4">
                        <strong>Preços </strong>
                    </th>
                </tr>
                <tr>
                    <th scope="col" colspan="1">
                    </th>
                    <th scope="col" colspan="1">
                        <strong>Tamanho</strong>
                    </th>
                    <th scope="col" colspan="1">
                        <strong>Valor</strong>
                    </th>
                    <th scope="col" colspan="1">
                        <strong>Qtde.</strong>
                    </th>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rptPrecos" runat="server">
                    <ItemTemplate>
                        <tr class="tblLinha">
                            <td>
                                <asp:HiddenField runat=server ID="hdPtmID" Value='<%#DataBinder.Eval(Container.DataItem, "PtmID")%>' />
                                <asp:RadioButton ID="rdbSelecionar" runat="server" />
                            </td>
                            <td class="peso">
                                <asp:HiddenField runat=server ID="hdPtmPes" Value='<%#DataBinder.Eval(Container.DataItem, "PtmPes")%>' />
                                <%# String.Format("{0:0}",DataBinder.Eval(Container.DataItem, "PtmPes"))%>g.
                            </td>
                            <td class="valor">
                                <asp:HiddenField runat=server ID="hdPtmVal" Value='<%#DataBinder.Eval(Container.DataItem, "PtmVal")%>' />
                                R$<%# String.Format("{0:0.00}", DataBinder.Eval(Container.DataItem, "PtmVal"))%></td>
                            <td>
                                <asp:TextBox ID="txtQtd" runat="server" Width="35px"></asp:TextBox>
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtQtd"
                                    Mask="999">
                                </ajaxToolkit:MaskedEditExtender>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
                <tr>
                    <td colspan="4" style="text-align: center;">
                        <asp:LinkButton ID="btnComprar" runat="server" CssClass="Comprar" 
                            OnClick="btnComprar_Click" CausesValidation="False"> Adicionar ao carrinho</asp:LinkButton>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
